package com.booktrade.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单表，存储用户购买的订单信息
 * </p>
 */
@Getter
@Setter
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 买家ID，关联到用户表
     */
    private Integer buyerId;

    /**
     * 卖家ID，关联到用户表
     */
    private Integer sellerId;

    /**
     * 订单总金额
     */
    private BigDecimal totalPrice;

    /**
     * 订单状态，如待付款、已付款、已发货、已收货等
     */
    private String status;

    /**
     * 订单创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 订单更新时间
     */
    private LocalDateTime updatedAt;
}
